from django.db import models
from apps.common.base.models import BaseModel
from apps.education.student.models import Student
from apps.education.course.models import Course

class CourseStudent(BaseModel):
    checkStatus = (
        ("PASS", "通过"),
        ("REFUSE", "拒绝"),
        ("CHECKING", "审核中"),
    )
    student=models.ForeignKey(Student, related_name='student_courseStudent', verbose_name='学生', on_delete=models.SET_NULL, null=True, blank=True, db_constraint=False)
    course=models.ForeignKey(Course, related_name='course_courseStudent', verbose_name='课程', on_delete=models.SET_NULL, null=True, blank=True, db_constraint=False)
    checkStatus = models.CharField("审核状态", max_length=100, choices=checkStatus, blank=True, default='CHECKING')
    remark = models.CharField("备注", max_length=200, blank=True, null=True, default='')

    class Meta:
        verbose_name = 'CourseStudent'
        verbose_name_plural = verbose_name
